import React, { PureComponent } from 'react';
import DescriptionList from '@/components/DescriptionList';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Card } from 'antd';

const { Description } = DescriptionList;
@Form.create()
class EntryBasic extends PureComponent {
  updateInfo = () => {
    const { updateInfo } = this.props;
    updateInfo();
  };

  render() {
    const { careerMatInfor } = this.props;
    const { sendDto, basicDto } = careerMatInfor;
    return (
      <div>
        <Card title={<span id="sendInfor">派单信息</span>}>
          <DescriptionList>
            <Description term="签约方">{sendDto.ordSndrName || '--'}</Description>
            <Description term="客户名称">{sendDto.custName || '--'}</Description>
            <Description term="所属客服"> {sendDto.creName || '--'} </Description>
            <Description term="入职任务来源">{sendDto.entrySourceName || '--'}</Description>
            <Description term="派单时间">{sendDto.sendCreTime || '--'}</Description>
            <Description term="服务类型">{sendDto.contTypeName || '--'}</Description>
          </DescriptionList>
        </Card>

        <Card
          title={<span id="basicma">基本信息</span>}
          extra={<a onClick={this.updateInfo}>修改</a>}
        >
          <DescriptionList>
            <Description term="姓名">{basicDto.empName || '--'}</Description>
            <Description term="证件类型">{basicDto.idType || '--'}</Description>
            <Description term="证件号">{basicDto.idCode || '--'}</Description>
            <Description term="性别">{basicDto.gender || '--'}</Description>
            <Description term="国籍">{basicDto.nation || '--'}</Description>
            <Description term="出生日期">{basicDto.birthDate || '--'}</Description>
            <Description term="电话">{basicDto.mobile || '--'}</Description>
            <Description term="邮箱">{basicDto.email || '--'}</Description>
          </DescriptionList>
        </Card>
      </div>
    );
  }
}

export default EntryBasic;
